extends Control


var data = null

signal view(data)
signal edit(data)
signal delete(data)


func _ready():
	pass 

func set_data(data):
	self.data = data
	var id = data["id"]
	
	$hbox/id.text = str(id)
	
	$hbox/name.text = data["remark"]
	var config = str2var(data["config"])
	var gym  = ""
	for item in config["gym"]:
		gym += str(item) + ","
	var drama  = ""
	for item in config["drama_id"]:
		drama += str(item) + ","
	$hbox/gyms.text = gym
	$hbox/dramas.text = drama


func _on_view_button_up():
	emit_signal("view", data)


func _on_edit_button_up():
	emit_signal("edit", data)


func _on_delete_button_up():
	emit_signal("delete", data)
